package com.kehutong.contact.entity;

import com.kehutong.contact.enums.CustomerStatus;
import com.kehutong.contact.enums.FollowUpType;
import com.kehutong.contact.enums.FollowUpWay;
import org.coraframework.bean.valid.CheckField;
import org.coraframework.orm.Entity;
import org.coraframework.orm.annotation.Column;
import org.coraframework.orm.annotation.Table;
import org.coraframework.orm.annotation.UnSave;
import org.coraframework.orm.util.IDType;
import java.time.LocalDateTime;


/**
 * 联系人动态
 * @author liujinwang
 */
@Table(value="t_contact_dynamics",comment = "联系人动态表", multi=true, idType= IDType.TIMESTAMP)
public class ContactDynamics extends Entity {

    private static final long serialVersionUID = 8765089898476087571L;

    protected ContactDynamics(String id) {
        super(id);
    }

    @Column(comment = "客户id")
    private String customerId;

    @Column(comment="类型,1资料 2跟进 3其他")
    private FollowUpType type;

    @CheckField("跟进方式不能为空")
    @Column(comment="跟进方式")
    private FollowUpWay followUpWay;

    @CheckField("跟进时间不能为空")
    @Column(comment = "跟进时间")
    private LocalDateTime followUpTime;

    @Column(comment="跟进描述",length = 256)
    private String desc;

    @CheckField("客户名称不能为空")
    @Column(comment = "客户名称")
    private String corpFullName;

    @CheckField("客户状态不能为空")
    @Column(comment="客户状态")
    private CustomerStatus customerStatus;

    @CheckField("联系人不能为空")
    @Column(comment = "联系人姓名")
    private String contactName;

    @Column(comment = "联系人id")
    private String contactId;

    @Column(comment = "附件名")
    private String fileName;

    @Column(comment = "附件id")
    private String fileId;
    /**
     * 评论数量
     */
    @UnSave
    private Long commentsCount;

    @Column(comment = "跟进人员")
    private String followUpName;

    @Column(comment = "跟进人员id")
    private String followUpId;

    @Column(comment = "提醒谁看")
    private String remind;

    @Column(comment="逻辑删除")
    private boolean deleted;

    public String getCustomerId() {
        return customerId;
    }

    public void setCustomerId(String customerId) {
        this.customerId = customerId;
    }

    public FollowUpType getType() {
        return type;
    }

    public void setType(FollowUpType type) {
        this.type = type;
    }

    public FollowUpWay getFollowUpWay() {
        return followUpWay;
    }

    public void setFollowUpWay(FollowUpWay followUpWay) {
        this.followUpWay = followUpWay;
    }

    public LocalDateTime getFollowUpTime() {
        return followUpTime;
    }

    public void setFollowUpTime(LocalDateTime followUpTime) {
        this.followUpTime = followUpTime;
    }

    @Override
    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public String getCorpFullName() {
        return corpFullName;
    }

    public void setCorpFullName(String corpFullName) {
        this.corpFullName = corpFullName;
    }

    public CustomerStatus getCustomerStatus() {
        return customerStatus;
    }

    public void setCustomerStatus(CustomerStatus customerStatus) {
        this.customerStatus = customerStatus;
    }

    public String getContactName() {
        return contactName;
    }

    public void setContactName(String contactName) {
        this.contactName = contactName;
    }

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    public String getFileId() {
        return fileId;
    }

    public void setFileId(String fileId) {
        this.fileId = fileId;
    }

    public Long getCommentsCount() {
        return commentsCount;
    }

    public void setCommentsCount(Long commentsCount) {
        this.commentsCount = commentsCount;
    }

    public String getFollowUpName() {
        return followUpName;
    }

    public void setFollowUpName(String followUpName) {
        this.followUpName = followUpName;
    }

    public String getFollowUpId() {
        return followUpId;
    }

    public void setFollowUpId(String followUpId) {
        this.followUpId = followUpId;
    }

    public String getRemind() {
        return remind;
    }

    public void setRemind(String remind) {
        this.remind = remind;
    }

    public String getContactId() {
        return contactId;
    }

    public void setContactId(String contactId) {
        this.contactId = contactId;
    }

    public boolean isDeleted() {
        return deleted;
    }

    public void setDeleted(boolean deleted) {
        this.deleted = deleted;
    }

}
